<?php
/**
 * User: fu
 * Date: 12-3-20
 * Time: 上午11:36
 */
?>
<div class="pricnav">
    <a href="editattach.php?act=add">添加附带发布</a>
</div>
<table class="table1">
    <thead>
        <tr>
            <th>ID</th>
            <th>名称</th>
            <th>文件</th>
            <th>模板</th>
            <th></th>
            <th></th>
        </tr>

    </thead>
    <?php
    $i=0; $classname=array('odd','even');
    foreach ($attach->select() as $v) {
        printf('<tr class="%s">
                <td>%s</td> <td>%s</td>
                <td>%s</td>  <td>%s</td>
                <td><a href="%s">删除</a></td>
                <td><a href="%s">修改</a></td> </tr> ',
                $classname[$i++%2],
                $v['id'], $v['name'],
                $v['file'], $v['tpl'],
                'editattach.php?act=del&aid=' . $v['id'],
                'editattach.php?act=alt&aid=' . $v['id']
                );
    }
    ?>


</table>